<?php $this->load->view('admin/public');?>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url('admin/indexc/index');?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">文章管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="<?=site_url('admin/articlec/lst');?>" method="get">
                    <table class="search-tab">
                        <tr>
                            <th width="120">选择分类:</th>
                            <td>
                                <select name="catid" id="">
                                    <option value="">全部</option>
                                    <option <?php
                                        if($this->input->get('catid')==19){
                                            echo 'selected';
                                        };
                                        ?> value="19">精品界面</option>
                                    <option <?php
                                        if($this->input->get('catid')==20){
                                            echo 'selected';
                                        };
                                        ?> value="20">推荐界面</option>
                                </select>
                            </td>
                            <th width="70">标题:</th>
                            <td><input class="common-text" placeholder="标题" name="title" value="<?=$this->input->get('title');?>" type="text"></td>
                            <td><input class="btn btn-primary btn2" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<?=site_url('admin/articlec/add');?>"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>ID</th>
                            <th>标题</th>
                            <th>缩略图</th>
                            <th>分类</th>
                            <th>发布人</th>
                            <th>时间</th>
                            <th>操作</th>
                        </tr>
                        <?php foreach ($data->result('array') as $v):?>
                        <tr>
                            <td><?=$v['id'];?></td>
                            <td title="<?=htmlspecialchars($v['title']);?>"><a target="_blank" href="" title="<?=htmlspecialchars($v['title']);?>"><?=htmlspecialchars($v['title']);?></a>
                            </td>
                            <td><?=$v['thumb'];?></td>
                            <td>
                            <?php 
                                if($v['catid']==19){
                                    echo '精品界面';
                                }else if($v['catid']==20){
                                    echo '推荐界面';
                                }
                            ?>
                            </td>
                            <td><?=$v['author'];?></td>
                            <td><?=date('Y-m-d H:i:s',$v['createtime']);?></td>
                            <td>
                                <a class="link-update" href="<?=site_url('admin/articlec/save/'.$v['id']);?>">修改</a>
                                <a class="link-del" onclick="return confirm('确定要删除吗');" href="<?=site_url('admin/articlec/delete/'.$v['id']);?>">删除</a>
                            </td>
                        </tr>
                    <?php endforeach;?>
                    </table>
                    <!-- 分页 -->
                    <div class="list-page"> <?=$page;?></div>
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>